#include<stdio.h>
int main(){
	int t,n;
	scanf("%d",&t);
	while(t--){
	scanf("%d",&n);
	if(n>=90&&n<100){printf("A\n");}
	if(n>=80&&n<90){printf("B\n");}
	if(n>=70&&n<80){printf("C\n");}
	if(n>=60&&n<70){printf("D\n");}
	if(n<60&&n>=0){printf("E\n");}
	if(n<0||n>100){printf("No answer!\n");
	}}

	return 0;
}
